<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML >
<html>
<head>
<base href="<%=basePath%>">

<title>企业信息管理系统--员工信息查询</title>
<link rel="stylesheet" href="css/staffData.css" type="text/css"></link>
</head>

<body>
	<c:if test="${section==null }">
		<jsp:forward page="/section/findAll"></jsp:forward>
	</c:if>
	<div>
		<form action="staff/findAll">
			<label>部门<select name="sectionID">
					<c:forEach items="${section }" var="s">
						<option value="${s.id }">${s.sectionName }</option>
					</c:forEach>

			</select> </label> <label>入职情况 <select name="state">
					<option value="1">在职</option>
					<option value="0">离职</option>
			</select> </label> <label>姓名<input type="search" name="userName" /> </label> <input type="submit" value="" class="sub">
		</form>
		<table>
			<tr>
				<td>ID</td>
				<td>姓名</td>
				<td>性别</td>
				<td>学历</td>
				<td>部门</td>
				<td>在职情况</td>
				<td>联系电话</td>
				<td>入职时间</td>
				<td>合同到期时间</td>
				<td>籍贯</td>
				<td>操作</td>
			</tr>
			<c:forEach items="${staff }" var="s">
				<tr>
					<td>${s.id }</td>
					<td>${s.userName }</td>
					<td><c:if test="${s.sex ==0}">女</c:if> <c:if test="${s.sex ==1}">男</c:if></td>
					<td>${s.education }</td>
					<td>${s.sectionName }</td>
					<td><c:if test="${s.state ==0}">离职</c:if> <c:if test="${s.state ==1}">在职</c:if></td>
					<td>${s.phone }</td>
					<td>${s.entryDate }</td>
					<td>${s.pact }</td>
					<td>${s.nativePlace }</td>
					<td><a href="">删除</a><a href="">修改 </a>
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>
</body>
</html>
